#include "fonts.h"
#include <Arduino.h>
#include <avr/pgmspace.h>

static unsigned char font_8x8[230][7] PROGMEM = {
	{0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /* P_0 */
	{0x00,0x00,0x00,0x08,0x00,0x00,0x00}, /* P_1 */
	{0x00,0x20,0x00,0x00,0x00,0x02,0x00}, /* P_2 */
	{0x00,0x20,0x00,0x08,0x00,0x02,0x00}, /* P_3 */
	{0x00,0x22,0x00,0x00,0x00,0x22,0x00}, /* P_4 */
	{0x00,0x22,0x00,0x08,0x00,0x22,0x00}, /* P_5 */
	{0x00,0x2A,0x00,0x00,0x00,0x2A,0x00}, /* P_6 */
	{0x00,0x2A,0x00,0x08,0x00,0x2A,0x00}, /* P_7 */
	{0x00,0x2A,0x00,0x22,0x00,0x2A,0x00}, /* P_8 */
	{0x00,0x2A,0x00,0x2A,0x00,0x2A,0x00}, /* P_9 */
	{0x00,0x55,0x00,0x41,0x00,0x55,0x00}, /* P10 */
	{0x00,0x55,0x00,0x49,0x00,0x55,0x00}, /* P11 */
	{0x00,0x55,0x00,0x55,0x00,0x55,0x00}, /* P12 */
	{0x55,0x00,0x41,0x08,0x41,0x00,0x55}, /* P13 */
	{0x55,0x00,0x51,0x00,0x45,0x00,0x55}, /* P14 */
	{0x55,0x00,0x51,0x08,0x45,0x00,0x55}, /* P15 */
	{0x55,0x00,0x55,0x00,0x55,0x00,0x55}, /* P16 */
	{0x55,0x00,0x55,0x08,0x55,0x00,0x55}, /* P17 */
	{0x55,0x20,0x55,0x00,0x55,0x02,0x55}, /* P18 */
	{0x55,0x20,0x55,0x08,0x55,0x02,0x55}, /* P19 */
	{0x55,0x22,0x55,0x00,0x55,0x22,0x55}, /* P20 */
	{0x55,0x22,0x55,0x08,0x55,0x22,0x55}, /* P21 */
	{0x55,0x2A,0x55,0x00,0x55,0x2A,0x55}, /* P22 */
	{0x55,0x2A,0x55,0x08,0x55,0x2A,0x55}, /* P23 */
	{0x55,0x2A,0x55,0x22,0x55,0x2A,0x55}, /* P24 */
	{0x55,0x2A,0x55,0x2A,0x55,0x2A,0x55}, /* P25 */
	{0x08,0x1C,0x2A,0x08,0x2A,0x1C,0x08}, /* <-> */
	{0x00,0x14,0x22,0x7F,0x22,0x14,0x00}, /* <|> */
	{0x08,0x1C,0x2A,0x08,0x08,0x08,0x08}, /* <-- */
	{0x00,0x04,0x02,0x7F,0x02,0x04,0x00}, /* /|\ */
	{0x08,0x08,0x08,0x08,0x2A,0x1C,0x08}, /* --> */
	{0x00,0x10,0x20,0x7F,0x20,0x10,0x00}, /* \|/ */
	{0x00,0x00,0x00,0x00,0x00,0x00,0x00}, /*     */
	{0x00,0x00,0x00,0x5F,0x00,0x00,0x00}, /*  !  */
	{0x00,0x00,0x07,0x00,0x07,0x00,0x00}, /*  "  */
	{0x00,0x14,0x3E,0x14,0x3E,0x14,0x00}, /*  #  */
	{0x00,0x24,0x2A,0x7F,0x2A,0x12,0x00}, /*  $  */
	{0x00,0x22,0x15,0x2A,0x54,0x22,0x00}, /*  %  */
	{0x00,0x36,0x49,0x56,0x20,0x50,0x00}, /*  &  */
	{0x00,0x00,0x04,0x02,0x01,0x00,0x00}, /*  '  */
	{0x00,0x00,0x1C,0x22,0x41,0x00,0x00}, /*  (  */
	{0x00,0x00,0x41,0x22,0x1C,0x00,0x00}, /*  )  */
	{0x00,0x14,0x08,0x3E,0x08,0x14,0x00}, /*  *  */
	{0x00,0x08,0x08,0x3E,0x08,0x08,0x00}, /*  +  */
	{0x00,0x00,0x40,0x20,0x00,0x00,0x00}, /*  ,  */
	{0x00,0x08,0x08,0x08,0x08,0x08,0x00}, /*  -  */
	{0x00,0x00,0x00,0x40,0x00,0x00,0x00}, /*  .  */
	{0x00,0x40,0x30,0x08,0x06,0x01,0x00}, /*  /  */
	{0x00,0x3E,0x41,0x49,0x41,0x3E,0x00}, /*  0  */
	{0x00,0x42,0x42,0x7F,0x40,0x40,0x00}, /*  1  */
	{0x00,0x42,0x61,0x51,0x49,0x46,0x00}, /*  2  */
	{0x00,0x22,0x41,0x49,0x49,0x36,0x00}, /*  3  */
	{0x00,0x18,0x14,0x12,0x7F,0x10,0x00}, /*  4  */
	{0x00,0x27,0x45,0x45,0x45,0x39,0x00}, /*  5  */
	{0x00,0x3E,0x45,0x45,0x45,0x38,0x00}, /*  6  */
	{0x00,0x01,0x01,0x71,0x0D,0x03,0x00}, /*  7  */
	{0x00,0x36,0x49,0x49,0x49,0x36,0x00}, /*  8  */
	{0x00,0x06,0x09,0x09,0x09,0x7F,0x00}, /*  9  */
	{0x00,0x00,0x00,0x24,0x00,0x00,0x00}, /*  :  */
	{0x00,0x00,0x40,0x24,0x00,0x00,0x00}, /*  ;  */
	{0x00,0x08,0x14,0x14,0x22,0x22,0x00}, /*  <  */
	{0x00,0x14,0x14,0x14,0x14,0x14,0x00}, /*  =  */
	{0x00,0x22,0x22,0x14,0x14,0x08,0x00}, /*  >  */
	{0x00,0x02,0x01,0x51,0x09,0x06,0x00}, /*  ?  */
	{0x00,0x3E,0x49,0x5D,0x51,0x1E,0x00}, /*  @  */
	{0x00,0x7E,0x09,0x09,0x09,0x7E,0x00}, /*  A  */
	{0x00,0x7F,0x49,0x49,0x49,0x36,0x00}, /*  B  */
	{0x00,0x3E,0x41,0x41,0x41,0x22,0x00}, /*  C  */
	{0x00,0x7F,0x41,0x41,0x41,0x3E,0x00}, /*  D  */
	{0x00,0x7F,0x49,0x49,0x41,0x41,0x00}, /*  E  */
	{0x00,0x7F,0x09,0x09,0x01,0x01,0x00}, /*  F  */
	{0x00,0x3E,0x41,0x41,0x49,0x3A,0x00}, /*  G  */
	{0x00,0x7F,0x08,0x08,0x08,0x7F,0x00}, /*  H  */
	{0x00,0x00,0x41,0x7F,0x41,0x00,0x00}, /*  I  */
	{0x00,0x20,0x40,0x41,0x3F,0x01,0x00}, /*  J  */
	{0x00,0x7F,0x08,0x14,0x22,0x41,0x00}, /*  K  */
	{0x00,0x7F,0x40,0x40,0x40,0x40,0x00}, /*  L  */
	{0x00,0x7F,0x02,0x0C,0x02,0x7F,0x00}, /*  M  */
	{0x00,0x7F,0x04,0x08,0x10,0x7F,0x00}, /*  N  */
	{0x00,0x3E,0x41,0x41,0x41,0x3E,0x00}, /*  O  */
	{0x00,0x7F,0x09,0x09,0x09,0x06,0x00}, /*  P  */
	{0x00,0x3E,0x41,0x51,0x21,0x5E,0x00}, /*  Q  */
	{0x00,0x7F,0x09,0x19,0x29,0x46,0x00}, /*  R  */
	{0x00,0x26,0x49,0x49,0x49,0x32,0x00}, /*  S  */
	{0x00,0x01,0x01,0x7F,0x01,0x01,0x00}, /*  T  */
	{0x00,0x3F,0x40,0x40,0x40,0x3F,0x00}, /*  U  */
	{0x00,0x03,0x1C,0x60,0x1C,0x03,0x00}, /*  V  */
	{0x00,0x3F,0x40,0x38,0x40,0x3F,0x00}, /*  W  */
	{0x00,0x63,0x14,0x08,0x14,0x63,0x00}, /*  X  */
	{0x00,0x03,0x04,0x78,0x04,0x03,0x00}, /*  Y  */
	{0x00,0x61,0x51,0x49,0x45,0x43,0x00}, /*  Z  */
	{0x00,0x00,0x7F,0x41,0x41,0x00,0x00}, /*  [  */
	{0x00,0x01,0x06,0x08,0x30,0x40,0x00}, /*  \  */
	{0x00,0x00,0x41,0x41,0x7F,0x00,0x00}, /*  ]  */
	{0x00,0x04,0x02,0x01,0x02,0x04,0x00}, /*  ^  */
	{0x00,0x40,0x40,0x40,0x40,0x40,0x00}, /*  _  */
	{0x00,0x00,0x01,0x02,0x04,0x00,0x00}, /*  `  */
	{0x00,0x20,0x54,0x54,0x54,0x78,0x00}, /*  a  */
	{0x00,0x7F,0x48,0x44,0x44,0x38,0x00}, /*  b  */
	{0x00,0x38,0x44,0x44,0x44,0x48,0x00}, /*  c  */
	{0x00,0x38,0x44,0x44,0x24,0x7F,0x00}, /*  d  */
	{0x00,0x38,0x54,0x54,0x54,0x18,0x00}, /*  e  */
	{0x00,0x00,0x04,0x7E,0x05,0x01,0x00}, /*  f  */
	{0x00,0x08,0x54,0x54,0x54,0x3C,0x00}, /*  g  */
	{0x00,0x7F,0x08,0x04,0x04,0x78,0x00}, /*  h  */
	{0x00,0x00,0x44,0x7D,0x40,0x00,0x00}, /*  i  */
	{0x00,0x40,0x44,0x3D,0x00,0x00,0x00}, /*  j  */
	{0x00,0x7F,0x10,0x18,0x24,0x40,0x00}, /*  k  */
	{0x00,0x00,0x41,0x7F,0x40,0x00,0x00}, /*  l  */
	{0x00,0x7C,0x04,0x78,0x04,0x78,0x00}, /*  m  */
	{0x00,0x7C,0x08,0x04,0x04,0x78,0x00}, /*  n  */
	{0x00,0x38,0x44,0x44,0x44,0x38,0x00}, /*  o  */
	{0x00,0x7C,0x14,0x14,0x14,0x08,0x00}, /*  p  */
	{0x00,0x08,0x14,0x14,0x14,0x7C,0x00}, /*  q  */
	{0x00,0x7C,0x08,0x04,0x04,0x08,0x00}, /*  r  */
	{0x00,0x48,0x54,0x54,0x54,0x24,0x00}, /*  s  */
	{0x00,0x00,0x04,0x3F,0x44,0x40,0x00}, /*  t  */
	{0x00,0x3C,0x40,0x40,0x20,0x7C,0x00}, /*  u  */
	{0x00,0x0C,0x30,0x40,0x30,0x0C,0x00}, /*  v  */
	{0x00,0x3C,0x40,0x38,0x40,0x3C,0x00}, /*  w  */
	{0x00,0x44,0x28,0x10,0x28,0x44,0x00}, /*  x  */
	{0x00,0x0C,0x50,0x50,0x50,0x3C,0x00}, /*  y  */
	{0x00,0x44,0x64,0x54,0x4C,0x44,0x00}, /*  z  */
	{0x00,0x00,0x08,0x36,0x41,0x00,0x00}, /*  {  */
	{0x00,0x00,0x00,0x7F,0x00,0x00,0x00}, /*  |  */
	{0x00,0x00,0x41,0x36,0x08,0x00,0x00}, /*  }  */
	{0x00,0x02,0x01,0x03,0x02,0x01,0x00}, /*  ~  */
	{0x00,0x2A,0x14,0x2A,0x14,0x2A,0x00}, /* ### */
	{0x1C,0x22,0x5D,0x55,0x55,0x22,0x1C}, /* (c) */
	{0x1C,0x22,0x5D,0x55,0x5D,0x22,0x1C}, /* Dot */
	{0x00,0x2A,0x7F,0x55,0x7F,0x2A,0x00}, /* Bam */
	{0x62,0x3A,0x6F,0x3A,0x6F,0x3A,0x62}, /* Crk */
	{0x00,0x00,0x00,0x22,0x00,0x00,0x00}, /* P_2 */
	{0x00,0x00,0x00,0x2A,0x00,0x00,0x00}, /* P_3 */
	{0x00,0x28,0x00,0x2A,0x00,0x28,0x00}, /* P_7 */
	{0x00,0x55,0x00,0x00,0x00,0x55,0x00}, /* P_8 */
	{0x08,0x1C,0x5E,0x7F,0x5E,0x1C,0x08}, /* BSp */
	{0x08,0x1C,0x3E,0x7F,0x3E,0x1C,0x08}, /* BDi */
	{0x1C,0x1C,0x4B,0x7F,0x4B,0x1C,0x1C}, /* BCl */
	{0x0E,0x1F,0x3F,0x7E,0x3F,0x1F,0x0E}, /* BHt */
	{0x08,0x14,0x52,0x69,0x52,0x14,0x08}, /* WSp */
	{0x08,0x14,0x22,0x41,0x22,0x14,0x08}, /* WDi */
	{0x1C,0x14,0x4B,0x75,0x4B,0x14,0x1C}, /* WCl */
	{0x0E,0x11,0x21,0x42,0x21,0x11,0x0E}, /* WHt */
	{0x00,0x7F,0x41,0x41,0x41,0x7F,0x00}, /* [0] */
	{0x00,0x00,0x00,0x7F,0x00,0x00,0x00}, /* [1] */
	{0x00,0x79,0x49,0x49,0x49,0x4F,0x00}, /* [2] */
	{0x00,0x49,0x49,0x49,0x49,0x7F,0x00}, /* [3] */
	{0x00,0x0F,0x08,0x08,0x08,0x7F,0x00}, /* [4] */
	{0x00,0x4F,0x49,0x49,0x49,0x79,0x00}, /* [5] */
	{0x00,0x7F,0x49,0x49,0x49,0x79,0x00}, /* [6] */
	{0x00,0x01,0x01,0x01,0x01,0x7F,0x00}, /* [7] */
	{0x00,0x7F,0x49,0x49,0x49,0x7F,0x00}, /* [8] */
	{0x00,0x0F,0x09,0x09,0x09,0x7F,0x00}, /* [9] */
	{0x42,0x7F,0x40,0x00,0x3E,0x41,0x3E}, /* 1_0 */
	{0x42,0x7F,0x40,0x00,0x3E,0x45,0x38}, /* 1_6 */
	{0x22,0x49,0x36,0x00,0x72,0x49,0x46}, /* 3_2 */
	{0x3E,0x45,0x38,0x00,0x0C,0x0A,0x7F}, /* 6_4 */
	{0x3E,0x00,0x3E,0x3E,0x00,0x3E,0x3E}, /* 100 */
	{0x3E,0x00,0x3A,0x2E,0x00,0x36,0x36}, /* 128 */
	{0x00,0x3A,0x7F,0x7F,0x7F,0x3A,0x00}, /* Pin */
	{0x00,0x1C,0x14,0x7F,0x14,0x1C,0x00}, /* RDr */
	{0x02,0x6E,0x6D,0x00,0x6D,0x6E,0x02}, /* GDr */
	{0x7F,0x41,0x5D,0x55,0x5D,0x41,0x7F}, /* WDr */
	{0x20,0x2E,0x1A,0x7F,0x1A,0x2E,0x20}, /* Est */
	{0x78,0x0A,0x1A,0x6F,0x1A,0x0A,0x78}, /* Sth */
	{0x7C,0x45,0x5F,0x45,0x5F,0x45,0x7C}, /* Wst */
	{0x24,0x14,0x7F,0x00,0x3F,0x48,0x44}, /* Nth */
	{0x0C,0x72,0x52,0x5D,0x52,0x72,0x0C}, /* WKg */
	{0x08,0x72,0x5C,0x57,0x5C,0x72,0x08}, /* WQn */
	{0x77,0x5D,0x56,0x55,0x56,0x5D,0x77}, /* WRk */
	{0x58,0x24,0x2A,0x3D,0x2A,0x24,0x58}, /* WBp */
	{0x04,0x6A,0x5D,0x42,0x45,0x48,0x70}, /* WKn */
	{0x60,0x58,0x56,0x55,0x56,0x58,0x60}, /* WPn */
	{0x1C,0x7E,0x7E,0x7D,0x7E,0x7E,0x1C}, /* BKg */
	{0x08,0x72,0x7C,0x7F,0x7C,0x72,0x08}, /* BQn */
	{0x67,0x7F,0x7E,0x7F,0x7E,0x7F,0x67}, /* BRk */
	{0x58,0x3C,0x36,0x23,0x36,0x3C,0x58}, /* BBp */
	{0x04,0x6E,0x7F,0x7E,0x7D,0x78,0x70}, /* BKn */
	{0x60,0x78,0x7E,0x7F,0x7E,0x78,0x60}, /* BPn */
	{0x06,0x01,0x06,0x78,0x06,0x01,0x06}, /* Ars */
	{0x01,0x39,0x46,0x44,0x46,0x39,0x01}, /* Trs */
	{0x41,0x22,0x3E,0x22,0x3E,0x22,0x41}, /* Gmi */
	{0x26,0x29,0x47,0x41,0x71,0x4A,0x32}, /* Ccr */
	{0x2C,0x52,0x21,0x01,0x21,0x52,0x4C}, /* Leo */
	{0x1F,0x01,0x1E,0x41,0x3E,0x54,0x0C}, /* Vgo */
	{0x50,0x56,0x59,0x41,0x59,0x56,0x50}, /* Lba */
	{0x1F,0x01,0x1E,0x01,0x1E,0x20,0x70}, /* Spo */
	{0x40,0x20,0x14,0x09,0x15,0x03,0x0F}, /* Sgs */
	{0x01,0x1E,0x01,0x41,0x5E,0x28,0x10}, /* Cpn */
	{0x24,0x12,0x24,0x12,0x24,0x12,0x24}, /* Aqs */
	{0x49,0x2A,0x1C,0x08,0x1C,0x2A,0x49}, /* Pcs */
	{0x1C,0x22,0x41,0x49,0x41,0x22,0x1C}, /* Sun */
	{0x00,0x1C,0x22,0x5D,0x63,0x41,0x00}, /* Mun */
	{0x10,0x04,0x10,0x2A,0x10,0x04,0x10}, /* Rsg */
	{0x00,0x05,0x2A,0x7A,0x2A,0x05,0x00}, /* Mcy */
	{0x00,0x06,0x29,0x79,0x29,0x06,0x00}, /* Vns */
	{0x00,0x30,0x4A,0x4F,0x4A,0x30,0x00}, /* Erh */
	{0x38,0x44,0x44,0x45,0x3D,0x03,0x0F}, /* Mrs */
	{0x24,0x22,0x22,0x32,0x2C,0x20,0x7F}, /* Jpr */
	{0x02,0x7F,0x0A,0x04,0x34,0x48,0x00}, /* Stn */
	{0x05,0x37,0x4A,0x4F,0x4A,0x37,0x05}, /* Urs */
	{0x06,0x08,0x28,0x7F,0x28,0x08,0x06}, /* Npe */
	{0x00,0x7F,0x49,0x49,0x49,0x46,0x00}, /* Plo */
	{0x2C,0x52,0x21,0x01,0x21,0x52,0x2C}, /* ANd */
	{0x1A,0x25,0x42,0x40,0x42,0x25,0x1A}, /* DNd */
	{0x20,0x57,0x20,0x08,0x24,0x22,0x20}, /* Cmt */
	{0x00,0x20,0x4A,0x7D,0x4A,0x20,0x00}, /* Anc */
	{0x3E,0x6B,0x55,0x6B,0x55,0x6B,0x3E}, /* Rok */
	{0x7F,0x41,0x41,0x4F,0x4A,0x4C,0x78}, /* Ppr */
	{0x20,0x51,0x36,0x1C,0x36,0x51,0x20}, /* Scs */
	{0x48,0x30,0x3A,0x54,0x0E,0x16,0x01}, /* Lzd */
	{0x03,0x7C,0x48,0x48,0x7C,0x43,0x40}, /* Spk */
	{0x00,0x00,0x41,0x41,0x7E,0x00,0x00}, /* Nun */
	{0x00,0x40,0x41,0x21,0x1E,0x60,0x00}, /* Gml */
	{0x01,0x7D,0x01,0x01,0x01,0x7E,0x00}, /* Hei */
	{0x0F,0x70,0x48,0x47,0x20,0x18,0x07}, /* Shn */
	{0x00,0x43,0x45,0x41,0x41,0x7E,0x00}, /* Pei */
	{0x0F,0x03,0x05,0x49,0x50,0x60,0x78}, /* ^\v */
	{0x78,0x60,0x50,0x49,0x05,0x03,0x0F}, /* v/^ */
	{0x0F,0x03,0x05,0x09,0x10,0x20,0x40}, /* ^\_ */
	{0x40,0x20,0x10,0x09,0x05,0x03,0x0F}, /* _/^ */
	{0x01,0x02,0x04,0x48,0x50,0x60,0x78}, /* '\v */
	{0x78,0x60,0x50,0x48,0x04,0x02,0x01}, /* v/' */
	{0x1C,0x22,0x41,0x41,0x41,0x22,0x1C}, /* W() */
	{0x1C,0x2A,0x55,0x6B,0x55,0x2A,0x1C}, /* G() */
	{0x1C,0x3E,0x7F,0x7F,0x7F,0x3E,0x1C}, /* B() */
	{0x7F,0x41,0x41,0x41,0x41,0x41,0x7F}, /* W[] */
	{0x7F,0x55,0x6B,0x55,0x6B,0x55,0x7F}, /* G[] */
	{0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F}, /* B[] */
};

static unsigned char font_4x8[160][3] PROGMEM = {
	{0x00,0x00,0x00}, /* P_0 */
	{0x00,0x08,0x00}, /* P_1 */
	{0x20,0x00,0x02}, /* P_2 */
	{0x20,0x08,0x02}, /* P_3 */
	{0x22,0x00,0x22}, /* P_4 */
	{0x22,0x08,0x22}, /* P_5 */
	{0x2A,0x00,0x2A}, /* P_6 */
	{0x2A,0x08,0x2A}, /* P_7 */
	{0x2A,0x22,0x2A}, /* P_8 */
	{0x2A,0x2A,0x2A}, /* P_9 */
	{0x55,0x41,0x55}, /* P10 */
	{0x55,0x49,0x55}, /* P11 */
	{0x55,0x55,0x55}, /* P12 */
	{0x55,0x6B,0x55}, /* P13 */
	{0x55,0x77,0x55}, /* P14 */
	{0x55,0x7F,0x55}, /* P15 */
	{0x7F,0x41,0x7F}, /* P16 */
	{0x7F,0x49,0x7F}, /* P17 */
	{0x7F,0x55,0x7F}, /* P18 */
	{0x7F,0x6B,0x7F}, /* P19 */
	{0x7F,0x77,0x7F}, /* P20 */
	{0x7F,0x7F,0x7F}, /* P21 */
	{0x55,0x00,0x55}, /* P22 */
	{0x55,0x08,0x55}, /* P23 */
	{0x55,0x22,0x55}, /* P24 */
	{0x55,0x2A,0x55}, /* P25 */
	{0x1C,0x2A,0x1C}, /* <-> */
	{0x22,0x7F,0x22}, /* <|> */
	{0x08,0x1C,0x2A}, /* <-- */
	{0x02,0x7F,0x02}, /* /|\ */
	{0x2A,0x1C,0x08}, /* --> */
	{0x20,0x7F,0x20}, /* \|/ */
	{0x00,0x00,0x00}, /*     */
	{0x00,0x5F,0x00}, /*  !  */
	{0x07,0x00,0x07}, /*  "  */
	{0x3E,0x14,0x3E}, /*  #  */
	{0x2E,0x7F,0x3A}, /*  $  */
	{0x33,0x08,0x66}, /*  %  */
	{0x36,0x49,0x74}, /*  &  */
	{0x04,0x02,0x01}, /*  '  */
	{0x1C,0x22,0x41}, /*  (  */
	{0x41,0x22,0x1C}, /*  )  */
	{0x14,0x3E,0x14}, /*  *  */
	{0x08,0x3E,0x08}, /*  +  */
	{0x40,0x20,0x00}, /*  ,  */
	{0x08,0x08,0x08}, /*  -  */
	{0x00,0x40,0x00}, /*  .  */
	{0x60,0x1C,0x03}, /*  /  */
	{0x3E,0x41,0x3E}, /*  0  */
	{0x42,0x7F,0x40}, /*  1  */
	{0x72,0x49,0x46}, /*  2  */
	{0x22,0x49,0x36}, /*  3  */
	{0x0C,0x0A,0x7F}, /*  4  */
	{0x27,0x45,0x39}, /*  5  */
	{0x3E,0x45,0x38}, /*  6  */
	{0x01,0x79,0x07}, /*  7  */
	{0x36,0x49,0x36}, /*  8  */
	{0x06,0x09,0x7F}, /*  9  */
	{0x00,0x24,0x00}, /*  :  */
	{0x40,0x24,0x00}, /*  ;  */
	{0x08,0x14,0x22}, /*  <  */
	{0x14,0x14,0x14}, /*  =  */
	{0x22,0x14,0x08}, /*  >  */
	{0x02,0x59,0x06}, /*  ?  */
	{0x3E,0x49,0x4E}, /*  @  */
	{0x7E,0x09,0x7E}, /*  A  */
	{0x7F,0x49,0x36}, /*  B  */
	{0x3E,0x41,0x22}, /*  C  */
	{0x7F,0x41,0x3E}, /*  D  */
	{0x7F,0x49,0x41}, /*  E  */
	{0x7F,0x09,0x01}, /*  F  */
	{0x3E,0x41,0x7A}, /*  G  */
	{0x7F,0x08,0x7F}, /*  H  */
	{0x41,0x7F,0x41}, /*  I  */
	{0x20,0x41,0x3F}, /*  J  */
	{0x7F,0x08,0x77}, /*  K  */
	{0x7F,0x40,0x40}, /*  L  */
	{0x7F,0x02,0x7F}, /*  M  */
	{0x7F,0x01,0x7E}, /*  N  */
	{0x3E,0x41,0x3E}, /*  O  */
	{0x7F,0x09,0x06}, /*  P  */
	{0x3E,0x41,0x7E}, /*  Q  */
	{0x7F,0x09,0x76}, /*  R  */
	{0x46,0x49,0x31}, /*  S  */
	{0x01,0x7F,0x01}, /*  T  */
	{0x3F,0x40,0x3F}, /*  U  */
	{0x0F,0x70,0x0F}, /*  V  */
	{0x7F,0x20,0x7F}, /*  W  */
	{0x77,0x08,0x77}, /*  X  */
	{0x07,0x78,0x07}, /*  Y  */
	{0x61,0x5D,0x43}, /*  Z  */
	{0x7F,0x41,0x41}, /*  [  */
	{0x03,0x1C,0x60}, /*  \  */
	{0x41,0x41,0x7F}, /*  ]  */
	{0x02,0x01,0x02}, /*  ^  */
	{0x40,0x40,0x40}, /*  _  */
	{0x01,0x02,0x04}, /*  `  */
	{0x20,0x54,0x78}, /*  a  */
	{0x7F,0x44,0x38}, /*  b  */
	{0x38,0x44,0x48}, /*  c  */
	{0x38,0x44,0x7F}, /*  d  */
	{0x38,0x54,0x18}, /*  e  */
	{0x04,0x7E,0x05}, /*  f  */
	{0x08,0x54,0x3C}, /*  g  */
	{0x7F,0x04,0x78}, /*  h  */
	{0x44,0x7D,0x40}, /*  i  */
	{0x44,0x3D,0x00}, /*  j  */
	{0x7F,0x10,0x6C}, /*  k  */
	{0x41,0x7F,0x40}, /*  l  */
	{0x7C,0x1C,0x78}, /*  m  */
	{0x7C,0x04,0x78}, /*  n  */
	{0x38,0x44,0x38}, /*  o  */
	{0x7C,0x14,0x08}, /*  p  */
	{0x08,0x14,0x7C}, /*  q  */
	{0x7C,0x08,0x04}, /*  r  */
	{0x48,0x54,0x24}, /*  s  */
	{0x04,0x3F,0x44}, /*  t  */
	{0x3C,0x40,0x7C}, /*  u  */
	{0x1C,0x60,0x1C}, /*  v  */
	{0x7C,0x20,0x7C}, /*  w  */
	{0x6C,0x10,0x6C}, /*  x  */
	{0x0C,0x50,0x3C}, /*  y  */
	{0x64,0x54,0x4C}, /*  z  */
	{0x08,0x36,0x41}, /*  {  */
	{0x00,0x7F,0x00}, /*  |  */
	{0x41,0x36,0x08}, /*  }  */
	{0x03,0x01,0x03}, /*  ~  */
	{0x2A,0x14,0x2A}, /* ### */
	{0x5D,0x55,0x55}, /* (c) */
	{0x3E,0x49,0x3E}, /* Dot */
	{0x2A,0x55,0x2A}, /* Bam */
	{0x7A,0x2F,0x7A}, /* Crk */
	{0x00,0x22,0x00}, /* P_2 */
	{0x00,0x2A,0x00}, /* P_3 */
	{0x28,0x2A,0x28}, /* P_7 */
	{0x55,0x00,0x55}, /* P_8 */
	{0x5C,0x7F,0x5C}, /* BSp */
	{0x1C,0x7F,0x1C}, /* BDi */
	{0x5D,0x7F,0x5D}, /* BCl */
	{0x1F,0x7E,0x1F}, /* BHt */
	{0x5C,0x73,0x5C}, /* WSp */
	{0x1C,0x63,0x1C}, /* WDi */
	{0x5D,0x6B,0x5D}, /* WCl */
	{0x1F,0x62,0x1F}, /* WHt */
	{0x7F,0x41,0x7F}, /* [0] */
	{0x00,0x7F,0x00}, /* [1] */
	{0x79,0x49,0x4F}, /* [2] */
	{0x49,0x49,0x7F}, /* [3] */
	{0x0F,0x08,0x7F}, /* [4] */
	{0x4F,0x49,0x79}, /* [5] */
	{0x7F,0x49,0x79}, /* [6] */
	{0x01,0x01,0x7F}, /* [7] */
	{0x7F,0x49,0x7F}, /* [8] */
	{0x0F,0x09,0x7F}, /* [9] */
	{0x20,0x57,0x20}, /* 1_0 */
	{0x00,0x77,0x60}, /* 1_6 */
	{0x15,0x77,0x42}, /* 3_2 */
	{0x30,0x27,0x76}, /* 6_4 */
	{0x6D,0x6D,0x6D}, /* 100 */
	{0x65,0x6D,0x69}, /* 128 */
};

static unsigned char font_2x8[10][2] PROGMEM = {
	{0x3E,0x3E}, /* 0 */
	{0x00,0x3E}, /* 1 */
	{0x3A,0x2E}, /* 2 */
	{0x2A,0x3E}, /* 3 */
	{0x0E,0x38}, /* 4 */
	{0x2E,0x3A}, /* 5 */
	{0x3E,0x3A}, /* 6 */
	{0x02,0x3E}, /* 7 */
	{0x36,0x36}, /* 8 */
	{0x0E,0x3E}, /* 9 */
};

static unsigned char font_4x4[48][3] PROGMEM = {
	{0x00,0x02,0x00}, /* P_0 P_1 */
	{0x44,0x02,0x11}, /* P_2 P_3 */
	{0x55,0x02,0x55}, /* P_4 P_5 */
	{0x77,0x02,0x77}, /* P_6 P_7 */
	{0x77,0x57,0x77}, /* P_8 P_9 */
	{0x12,0x12,0x12}, /* P10 P11 */
	{0x47,0x40,0x40}, /* P12 P13 */
	{0x00,0x70,0x07}, /* P14 P15 */
	{0x71,0x17,0x11}, /* P16 P17 */
	{0x17,0x12,0x72}, /* P18 P19 */
	{0x22,0x72,0x27}, /* P20 P21 */
	{0x74,0x47,0x44}, /* P22 P23 */
	{0x44,0x42,0x71}, /* P24 P25 */
	{0x15,0x22,0x45}, /* <-> <|> */
	{0x70,0x07,0x77}, /* <-- /|\ */
	{0x70,0x05,0x55}, /* --> \|/ */
	{0x00,0x05,0x00}, /*      !  */
	{0x37,0x05,0x37}, /*  "   #  */
	{0x45,0x72,0x15}, /*  $   %  */
	{0x70,0x73,0x60}, /*  &   '  */
	{0x05,0x22,0x50}, /*  (   )  */
	{0x52,0x37,0x52}, /*  *   +  */
	{0x42,0x22,0x02}, /*  ,   -  */
	{0x04,0x42,0x01}, /*  .   /  */
	{0x00,0x70,0x77}, /*  0   1  */
	{0x00,0x55,0x67}, /*  2   3  */
	{0x00,0x35,0x63}, /*  4   5  */
	{0x00,0x71,0x67}, /*  6   7  */
	{0x00,0x53,0x57}, /*  8   9  */
	{0x04,0x55,0x00}, /*  :   ;  */
	{0x25,0x25,0x55}, /*  <   =  */
	{0x51,0x25,0x22}, /*  >   ?  */
	{0x26,0x73,0x66}, /*  @   A  */
	{0x72,0x75,0x25}, /*  B   C  */
	{0x77,0x57,0x25}, /*  D   E  */
	{0x72,0x35,0x17}, /*  F   G  */
	{0x75,0x27,0x75}, /*  H   I  */
	{0x57,0x72,0x15}, /*  J   K  */
	{0x77,0x43,0x47}, /*  L   M  */
	{0x72,0x15,0x62}, /*  N   O  */
	{0x72,0x35,0x36}, /*  P   Q  */
	{0x74,0x37,0x51}, /*  R   S  */
	{0x13,0x74,0x13}, /*  T   U  */
	{0x37,0x66,0x37}, /*  V   W  */
	{0x51,0x26,0x51}, /*  X   Y  */
	{0x17,0x75,0x45}, /*  Z   [  */
	{0x15,0x25,0x47}, /*  \   ]  */
	{0x24,0x14,0x24}, /*  ^   _  */
};

static unsigned char font_2x4[5][2] PROGMEM = {
	{0x70,0x77}, /* 0 1 */
	{0x55,0x67}, /* 2 3 */
	{0x35,0x63}, /* 4 5 */
	{0x71,0x67}, /* 6 7 */
	{0x53,0x57}, /* 8 9 */
};

unsigned char get_font_column_8x8(unsigned char ch, unsigned char col) {
	return pgm_read_byte(&(font_8x8[ch][col]));
}

unsigned char get_font_column_4x8(unsigned char ch, unsigned char col) {
	return pgm_read_byte(&(font_4x8[ch][col]));
}

unsigned char get_font_column_2x8(unsigned char ch, unsigned char col) {
	if (ch >= F_0 && ch <= F_9) ch -= F_0;
	else if (ch >= F_0_ALT && ch <= F_9_ALT) ch -= F_0_ALT;
	else return 0;
	return pgm_read_byte(&(font_2x8[ch][col]));
}

unsigned char get_font_column_4x4(unsigned char ch, unsigned char col) {
	unsigned char temp = pgm_read_byte(&(font_4x4[ch >> 1][col]));
	if (ch & 1) return (temp & 0x0F) | (temp << 4);
	else        return (temp & 0xF0) | (temp >> 4);
}

unsigned char get_font_column_2x4(unsigned char ch, unsigned char col) {
	if (ch >= F_0 && ch <= F_9) ch -= F_0;
	else if (ch >= F_0_ALT && ch <= F_9_ALT) ch -= F_0_ALT;
	else return 0;
	unsigned char temp = pgm_read_byte(&(font_2x4[ch >> 1][col]));
	if (ch & 1) return (temp & 0x0F) | (temp << 4);
	else        return (temp & 0xF0) | (temp >> 4);
}

unsigned char _font_pip2(unsigned char n) {
	switch (n) {
		case 2: return F_PIP_ALT_2;
		case 3: return F_PIP_ALT_3;
		case 7: return F_PIP_ALT_7;
		case 8: return F_PIP_ALT_8;
		default: return F_PIP(n);
	}
}